package weather_service.weatherprovider.weatherdatamodel;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * A single Day's worth of forecast, loosely split into day and night.
 * <p/>
 */
public class Day {
  private String dayIndex;
  private String dayName;
  private String dayDate;
  private String high;
  private String low;
  private String sunriseTime;
  private String sunsetTime;
  private List parts = new ArrayList();

  public String getDayIndex() {
    return dayIndex;
  }

  public void setDayIndex(String dayId) {
    this.dayIndex = dayId;
  }

  public String getDayDate() {
    return dayDate;
  }

  public void setDayDate(String dayText) {
    this.dayDate = dayText;
  }

  public String getHigh() {
    return high;
  }

  public void setHigh(String high) {
    this.high = high;
  }

  public String getLow() {
    return low;
  }

  public void setLow(String low) {
    this.low = low;
  }

  public String getSunriseTime() {
    return sunriseTime;
  }

  public void setSunriseTime(String sunriseTime) {
    this.sunriseTime = sunriseTime;
  }

  public String getSunsetTime() {
    return sunsetTime;
  }

  public void setSunsetTime(String sunsetTime) {
    this.sunsetTime = sunsetTime;
  }

  public String getDayName() {
    return dayName;
  }

  public void setDayName(String weekDay) {
    this.dayName = weekDay;
  }

  public List getParts() {
    return Collections.unmodifiableList(parts);
  }

  public void addPart(DayPart part) {
    parts.add(part);
  }

  public String toString() {
    return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
  }
}


